﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Problem2
{
    class Program
    {
        static void Main(string[] args)
        {
            int sum = 0;
            int a=1, b=2, t=0;

            while (b <= 4000000)
            {
                if (b % 2 == 0)
                {
                    sum += b;
                }

                t = a + b;
                a = b;
                b = t;
            }

            Console.WriteLine(sum);
            Console.ReadKey();
        }
    }
}
